import { View, Text, Image, WebView } from "@tarojs/components";
import Taro, { useDidShow, useLoad } from "@tarojs/taro";
import { iconSetting, iconWroing, mineBg, yxxf } from "../../assets/files.js";
import { setStore, getStore } from "../../utils/localStore";
import { useEffect, useState } from "react";
import { iconMineInfo, iconRightGray } from "../../assets/files";
import { getParams, navigateTo } from "../../common/_";
import { Button, NavBar } from "@nutui/nutui-react-taro";
import LoginModal from "../../components/login/index.jsx";
import { selectUserInfo } from "../../api/user.js";
import { baseUrl } from "../../utils/request.js";
import useNavInfo from "../../hooks/useNavInfo.js";
import "./index.scss";

export default function PdfView() {

  const [pdfUrl,setpdfUrl] = useState('')
  
  useEffect(()=>{
   console.log( Taro.getCurrentInstance().page.$taroParams.url);
   setpdfUrl(baseUrl+Taro.getCurrentInstance().page.$taroParams.url)
  })

  return (
    <View className="wrap">
        <WebView src={pdfUrl}/>
    </View>
  );
}
